package cn.kxm.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.kxm.dao.PowerMapper;
import cn.kxm.pojo.Acl;
import cn.kxm.pojo.Model;
import cn.kxm.pojo.Role;
import cn.kxm.service.PowerService;
@Service
public class PowerServiceImpl implements PowerService{

	@Autowired
	private PowerMapper pm;
	@Override
	public List<Map<String, Object>> findone() {
		// TODO Auto-generated method stub
		return pm.findone();
	}

	@Override
	public List<Map<String, Object>> findtwo(Integer parentId) {
		// TODO Auto-generated method stub
		return pm.findtwo(parentId);
	}

	@Override
	public List<Map<String, Object>> findthree(Integer parentId,Integer roleId) {
		// TODO Auto-generated method stub
		return pm.findthree(parentId,roleId);
	}

	@Override
	public List<Map<String, Object>> findrole(Integer id, String roleName,
			Integer page, Integer size) {
		// TODO Auto-generated method stub
		return pm.findrole(id, roleName, page, size);
	}

	@Override
	public int getCount(Integer id, String roleName) {
		// TODO Auto-generated method stub
		return pm.getCount(id, roleName);
	}

	@Override
	public int getid() {
		// TODO Auto-generated method stub
		return pm.getid();
	}

	@Override
	public List<Role> getlist() {
		// TODO Auto-generated method stub
		return pm.getlist();
	}

	@Override
	public int add(Role r) {
		// TODO Auto-generated method stub
		return pm.add(r);
	}

	@Override
	public Map<String, Object> getoneById(Integer id) {
		// TODO Auto-generated method stub
		return pm.getoneById(id);
	}

	@Override
	public int modifyRole(Role r) {
		// TODO Auto-generated method stub
		return pm.modifyRole(r);
	}

	@Override
	public int delete(Integer id) {
		// TODO Auto-generated method stub
		return pm.delete(id);
	}

	@Override
	public int deleteAcl(Integer rid) {
		// TODO Auto-generated method stub
		return pm.deleteAcl(rid);
	}

	@Override
	public int insert(Integer rid, Integer modelid) {
		// TODO Auto-generated method stub
		return pm.insert(rid, modelid);
	}

	@Override
	public Acl check(Integer rid, String url) {
		// TODO Auto-generated method stub
		return pm.check(rid, url);
	}

	@Override
	public Model checkid(String url) {
		// TODO Auto-generated method stub
		return pm.checkid(url);
	}

	@Override
	public Acl checkmid(Integer mid,Integer rid) {
		// TODO Auto-generated method stub
		return pm.checkmid(mid,rid);
	}

}
